The shock absorber is one of a variety of machine elements and absorbs shocks. Shock absorbers are applied to, for example, suspensions of automobiles (see, for example, Japanese Laid-open Utility Model Publication No. 6-79610, Japanese Laid-open Patent Publication No. 62-289408, Japanese Examined Utility Model Publication No. 5-17286), walking sticks used as an aid in walking (see, for example, Japanese Laid-open Patent Publication No. 2002-199917), and the like. Recently, a walking stick in which an electronic device is incorporated has been proposed (see, for example, Japanese Examined Utility Model Publication No. 7-46253).